package JavaSE.demoSE789;

class Animal {


    public String name;
    public int age;
    public float weight;

    public Animal(){
        System.out.println("父类的构造方法!");
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    public void eat() {
        System.out.println(name + "正在吃饭");
    }

    public void sleep() {
        System.out.println(name + "正在睡觉");
    }

    void mew() {
        System.out.println(name + "喵喵喵~~~");
    }
}
class Date extends Animal{

    public Date(){

    }

    public void mod(){

        //System.out.println(a);

    }
    //super不能在静态方法中使用
    public static void mend(){
        //System.out.println(super.a);---不可使用
    }
}

public class TestDemo3 {
    public static void main(String[] args) {
        Date date = new Date();

    }
}
